package com.cai.xiaobai.controller;


import com.cai.xiaobai.result.R;
import com.cai.xiaobai.result.Result;
import com.cai.xiaobai.service.IUserInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.net.http.HttpResponse;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-05-13
 */
@RestController
@RequestMapping("/user-info")
@AllArgsConstructor
@Tag(name = "用户模块")
public class UserInfoController {
    private final IUserInfoService iUserInfoService;

    @GetMapping("/login")
    @Operation(summary = "登录接口")
    public Result getSessionId(@RequestParam String code) {
        return iUserInfoService.getSessionId(code);
    }

}
